{include file="public/header" /}
<body>
<section class="main-content-wrapper">
	<section id="main-content">
		<div class="row">
			<div class="col-md-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">密码修改</h3>
					</div>
					<div class="panel-body">
						<form action="/admin/system/admin_info" method="post" enctype="multipart/form-data" class="form-horizontal form-border">
							<div class="form-group">
								<label class="col-sm-2 control-label">旧密码</label>
								<div class="col-sm-8">
									<input type="text" name="password" class="form-control" value="" placeholder="旧密码">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">新密码</label>
								<div class="col-sm-8">
									<input type="text" name="new_password" class="form-control" value="" placeholder="新密码">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">重复密码</label>
								<div class="col-sm-8">
									<input type="text" name="repeat_password" class="form-control" value="" placeholder="重复新密码">
								</div>
							</div>
							<div class="panel-body">
								<button type="submit" class="btn btn_5 btn-lg btn-default w_update">发布</button>
							</div>
						</form>

					</div>
				</div>
			</div>
		</div>
	</section>
</section>
<script>
	/**
	 * 从 file 域获取 本地图片 url
	 */
	function getFileUrl(sourceId) {
		var url;
		if (navigator.userAgent.indexOf("MSIE")>=1) { // IE
			url = document.getElementById(sourceId).value;
		} else if(navigator.userAgent.indexOf("Firefox")>0) { // Firefox
			url = window.URL.createObjectURL(document.getElementById(sourceId).files.item(0));
		} else if(navigator.userAgent.indexOf("Chrome")>0) { // Chrome
			url = window.URL.createObjectURL(document.getElementById(sourceId).files.item(0));
		}
		return url;
	}
	/**
	 * 将本地图片 显示到浏览器上
	 */
	function preImg(sourceId, targetId) {
		var url = getFileUrl(sourceId);
		var imgPre = document.getElementById(targetId);
		imgPre.src = url;
	}
</script>
</body>
</html>
